<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>{%.Title%} - Approval</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/oidc/static/style.css" rel="stylesheet" data-role="global">
    <link rel="icon" type="image/svg" href="/oidc/static/{%.LogoDir%}/favicon.svg">
    <link rel="manifest" href="/oidc/static/manifest.json">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="/oidc/static/ms-icon-144x144.png">
    <meta name="theme-color" content="#262626">
</head>

<body>
    <div class="clg-head">
        <div class="clg-head-inner">
            <div class="clg-logo " style="background-image: url(/oidc/static/{%.LogoDir%}/logo.svg);">
                <a href="/">{%.Title%} </a>
            </div>
        </div>
    </div>
    <div class="clg-wrap">
        <div class="clg-wrap-inner">
            <div class="clg-wrap-con clg-onpage" id="loginBox">
                <div class="clg-mod J-commonLoginContent ">
                    <div class="clg-mod-tab J-loginContentBox J-qcloginBox">
                        <div class="clg-mod-tit J-txtLoginTitle">授权信息</div>
                        <div class="clg-form J-loginForm">
                            <div>【{%.Title%} 控制台】将获得以下权限:</div>
                            <ul class="clg-form-list">
                                {{ range $scope := .Scopes }}
                                <li>
                                    <div class="clg-form-input">
                                        <div class="clg-form-unit">
                                            <p class="clg-form-unit-txt" style="margin-top:5px">
                                                >{{ $scope }}</p>
                                        </div>
                                    </div>
                                </li>
                                {{ end }}
                            </ul>
                            <form method="post" id="grantForm" style="margin-top:30px">
                                <input type="hidden" name="req" value="{{ .AuthReqID }}" />
                                <input type="hidden" name="approval" value="approve">
                                <div class="clg-form-btn">
                                    <a onclick="subgrantForm();" class="clg-btn J-loginBtn">确认</a>
                                </div>
                            </form>
                            <form method="post" id="cancelForm" style="margin-top:10px">
                                <input type="hidden" name="req" value="{{ .AuthReqID }}" />
                                <input type="hidden" name="approval" value="rejected">
                                <div class="clg-form-btn">
                                    <a onclick="subgcancelForm();" class="clg-btn J-loginBtn"
                                        style="background-color:#fff;color: black;border: 1px solid #ddd">取消</a>
                                </div>
                            </form>

                        </div>
                    </div>
                </div>
                <div class="clg-wrap-aside">
                    <div class="clg-wrap-aside-inner">
                        <div class="clg-wrap-aside-tit">{%.Title%} </div>
                        <div class="clg-wrap-aside-list">
                            <ul>
                                <li><span>登录成功，需要您再次确认 【{%.Title%} 控制台】 可以获取权限</span></li>
                            </ul>
                        </div>
                        <div class="clg-wrap-aside-btn"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        function subgrantForm() {
            document.getElementById("grantForm").submit();
        }
        function subgcancelForm() {
            document.getElementById("grantForm").submit();
        }
    </script>
</body>

</html>